package com.jt.zxchoujiang.mapper;

import com.jt.zxchoujiang.pojo.ChouJiang;
import com.jt.zxchoujiang.pojo.Prize;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ChouJiangMapper {

    @Insert("insert into zxcj(name,phone,loc,result) " +
            " values(#{name},#{phone},#{loc},#{result})")
    public int insert(ChouJiang choujiang);

    @Select("select * from zxcj order by id desc")
    public List<ChouJiang> findAll();

    @Select("select * from prize")
    public List<Prize> findAllPrize();

    @Insert("insert into prize(content) values(#{content})")
    public int insertPrize(Prize prize);
}
